CommandDeselect Class Reference

#include <CommandDeselect.h>

Inheritance diagram for CommandDeselect:

Command List of all members.

Public Member Functions

 CommandDeselect (TraffEduObject *obj, OSGWindows *osgwind)
bool execute ()
bool unexecute ()
void changeState ()
void changeStateReverse ()

Private Attributes

OSGWindows * osgwind_
vector< TraffEduObject * > deselectedObjs_
osg::StateSet * stateset

Detailed Description

Definition at line 7 of file CommandDeselect.h.


Constructor & Destructor Documentation

CommandDeselect::CommandDeselect (  TraffEduObject *  obj,
OSGWindows *  osgwind
) 
 

A constructor. Initializes osgwind_ variable and drop the deselected object from the selected object list.

Parameters:
obj a TraffEduObject pointer.
osgwind an OSGWindows pointer.

Definition at line 2 of file CommandDeselect.cpp.

References deselectedObjs_, OSGWindows::dropUnselectedObject(), osgwind, and osgwind_.


Member Function Documentation

void CommandDeselect::changeState (   ) 
 

highlight the seleted objects in the environment.

Definition at line 33 of file CommandDeselect.cpp.

References stateset.

void CommandDeselect::changeStateReverse (   ) 
 

un_highlight the selected objects in the environment.

Definition at line 41 of file CommandDeselect.cpp.

References stateset.

Referenced by execute().

bool CommandDeselect::execute (   )  [virtual]
 

do the deselection operation.

Returns:
Operation success

Implements Command.

Definition at line 15 of file CommandDeselect.cpp.

References changeStateReverse(), deselectedObjs_, OSGWindows::getObjects(), osgwind_, and stateset.

Referenced by OSGWindows::addCommandDeselect().

bool CommandDeselect::unexecute (   )  [virtual]
 

undo the deselection operation.

Returns:
Operation success

Implements Command.

Definition at line 28 of file CommandDeselect.cpp.


Member Data Documentation

vector<TraffEduObject*> CommandDeselect::deselectedObjs_ [private]
 

a private vector of TraffEduObjects. It holds the deselected objects.

Definition at line 21 of file CommandDeselect.h.

Referenced by CommandDeselect(), and execute().

OSGWindows* CommandDeselect::osgwind_ [private]
 

a private variable. It is initialized with the unique OSGWindows instance.

Definition at line 15 of file CommandDeselect.h.

Referenced by CommandDeselect(), and execute().

osg::StateSet* CommandDeselect::stateset [private]
 

a private osg::StateSet pointer. It holds state of the selected/deselected objects.

Definition at line 27 of file CommandDeselect.h.

Referenced by changeState(), changeStateReverse(), and execute().


The documentation for this class was generated from the following files:
Generated on Sun May 28 18:54:12 2006 for TraffEdu by  doxygen 1.4.6-NO